package edu.zjut.hjg.saas.web.model.form;

import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.Length;

/**
 * 注册租户表单
 * 
 * @author hjg
 */
public class RegisterTenantForm {

    @Pattern(regexp = "^[a-zA-Z]{1}[a-zA-Z0-9_]{2,15}$")
    private String loginId;

    @Length(min = 6, max = 20)
    private String password;

    @Length(min = 1, max = 50)
    private String name;

    @Email
    private String email;

    @Length(min = 0, max = 50)
    private String contact;
    
    @Pattern(regexp = "^[0-9/-]*$")
    private String phone;

    public String getLoginId() {
        return loginId;
    }

    public void setLoginId(String loginId) {
        this.loginId = loginId;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Override
    public String toString() {
        return "RegisterTenantForm [contact=" + contact + ", email=" + email + ", loginId="
                + loginId + ", name=" + name + ", password=" + password + ", phone=" + phone + "]";
    }
}
